home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK2.toast / Development Kits (Disc 2) / ScriptX / Documentation / Code Examples from Docs / compguid / printing / docprn / media.sx < prev   
Encoding:
Text File  |  1996-05-21  |  1.3 KB  |  44 lines  |  [TEXT/ttxt]

  1. -- Filename:
  2. --     MEDIA.SX
  3.  
  4. -- Other Files Required: 
  5. --     1000.BMP, 1001.BMP, 1002.BMP, 1003.BMP
  6.  
  7. -- Purpose:
  8. --     Demonstrates a simple working document
  9.  
  10. -- Specialized Classes:
  11. --     None
  12.  
  13. -- Instructions to User:
  14. --     This script loads in the media, stores it, and creates a proxy for it.  To
  15. -- create the titlecontainer, run the loadme.sx script.
  16. --
  17. --        When the jailbird.sxt title runs a window will appear with the title page.
  18. -- Click any where in this page to go to the next page.  Subsequent pages will
  19. -- contain forward and backward buttons for traversing the document.
  20.  
  21. -- Author:
  22. --     Kim Swix
  23.  
  24. ------------------------------------------------------------------------
  25. in module docModule
  26.  
  27. -- ********************************************************************
  28. -- Load in the bitmaps and create global proxys for them
  29. -- ********************************************************************
  30. global bmList := #("1000.bmp", "1001.bmp", "1002.bmp", "1003.bmp")
  31.  
  32. function loadAndCreateProxy item ->
  33. (   local st, bm
  34.     st := getstream (spawn thescriptdir "media") item @readable
  35.     bm := importMedia theimportexportengine st @image @dib @bitmap
  36.     add  docCont  (item as string)  bm
  37.     update docCont
  38.     makePurgeable bm
  39. )
  40.  
  41. forEach bmList loadAndCreateProxy undefined
  42.  
  43. bmList := undefined
  44.